﻿using System;
using System.Collections.ObjectModel;
using System.Linq;
using System.Runtime.Serialization;

namespace RockBus.DataContracts
{
    [CollectionDataContract(Namespace = StringConstants.RockBusNamespace)]
    public class ResponseInfoCollection : Collection<ResponseInfo>
    {
        public ResponseInfo this[string id]
        {
            get
            {
                return this.FirstOrDefault<ResponseInfo>((ri) => StringComparer.InvariantCultureIgnoreCase.Compare(ri.Id, id) == 0);
            }
        }
    }
}